Field
The present invention relates to improved data processing system, and more specifically, to parallel mapping of client partition memory to multiple physical adapters.
Description of Related Art
Administrators often logically partition the resources of server computers through virtualization. A hypervisor is used to expose virtualized computing hardware to a group of operating systems. For example, the hypervisor may be used to launch virtual computer, each of which provides an operating system (OS) with a set of virtualized computing hardware. In practice, the hypervisor typically launches a server guest operating OS and multiple client guest OSs. A server guest OS acts as a virtual server, and the client guest OSs are virtual computers.
A client guest OS user directly interfaces with virtualized hardware through virtual adapters. A virtual adapter is the virtual analog of a physical device. Common virtualized hardware elements include virtual SCSI controllers and virtual data storage drives (i.e., a virtual disk). In general, a hypervisor accesses data storage units in order to provide storage space to client guest OSs. Oftentimes, a hypervisor accesses multiple physical data storage drives, presented as virtual hard drives to the client guest OSs. One example of such a virtual disk includes logically grouping a set of solid state drives (SSDs) using software-based RAID 1 (i.e., mirroring). A client guest OS can access this virtual disk to store files. Thus, the virtual disk is the virtualized version of the physical solid state drives.
Client guest OSs access server resources using virtual input/output (I/O). Virtual I/O allows a server guest OS to fulfill user commands executed by a client guest OS by translating the virtual I/O associated with the user command to a physical I/O. This physical I/O is then executed on physical hardware (i.e., a physical adapter). For example, a user may save a file to a virtual disk. The client guest OS issues a virtual I/O command to save the file to virtual disk. However, the server guest OS ultimately needs to save the file to a physical disk. To do so, the server guest OS translates the virtual I/O command to a physical I/O command. After completing the physical I/O command, the server guest OS sends a message to the client guest OS to notify the user of a successful save to virtual disk.
To manage large stacks of I/Os from multiple client guest OSs, hypervisors use I/O buffer pages and translation control entry (TCE) tables. The hypervisor translates addresses of I/O buffer pages using TCE tables. The hypervisor uses TCE tables to ensure that the proper I/O buffer pages are targeted during I/O execution. That is, the server guest OS instructs the hypervisor to map an I/O buffer page to an adapter using a TCE entry as a pointer to the I/O buffer page. This is done to execute I/Os referencing the I/O buffer page. After executing the I/O, the server guest OS instructs the hypervisor to unmap the I/O buffer pages. In the case of a single physical adapter, the server guest OS then sends a message to the client guest OS confirming completion of the I/O.
In the case of multiple physical adapters, executing an I/O from a client guest OS requires I/O coordination with the multiple physical adapters. Currently, I/O buffer pages are mapped serially. That is, if a virtual I/O requires physical I/Os on multiple physical adapters, each I/O buffer page associated with one of the physical I/Os must be mapped and unmapped, one after another. Mapping and unmapping I/O buffer pages in this manner can be time-consuming, especially in the case of numerous physical adapters. Continuing with the example above, if a user saves a file to a virtual disk, the client guest OS sends a virtual I/O to the server guest OS. Since there are multiple physical drives, the server guest OS instructs the hypervisor to map the I/O buffer page to the first physical drive, executes the physical I/O on the physical drive, and instructs the hypervisor to unmap the I/O buffer page. Subsequently, the server guest OS instructs the hypervisor to map the I/O buffer page to the second physical drive and repeats this process for each physical drive. Since each mapping and unmapping requires several processor cycles to complete, serial mapping of I/O buffer pages requires a large amount of time.